Label widget

The label widget gives the possibility to display text and tags values.

Path: View> Toolbars and Docking Windows> Widget Gallery

Label properties

Drag and drop the widget inside the page and select the widget to open the properties dialog of the widget.

Note that some properties are visible only when the "Show Advanced Properties" button is selected.

Property Description
Text

The string to display. String can be static or retrieved from a TAG. See "Attaching widget to tags "

Marker Enable a Marker around the widget (It is visible only inside JMobile Studio)
Events Action that will be executed if widget contents change. See "Events"
Text Text properties
Frame Parameters to enable and configure a frame of the widget and/or a color for the background
Live Tags Enable to use tags values inside the text message. See "Live Tags"
- Enable Live TagEnable live tags placeholder
- Dynamic SubscriptionWhen true, only the tags that are visible are retrieved from the communication protocol. When false, all tags are kept continuously updated even they are not visible.
Scrolling

Parameters to enable and configure the scrolling of the text message

  • None
  • Slow
  • Normal
  • Fast
  • Custom

When the custom mode is selected, the below parameters can be defined:

- Scroll type

For each timeout, the text is scrolled of a custom amount of characters or pixels.

  • Characters
  • Pixels
- Scroll delay The timeout after which label effectively start to scroll (mSec)
- Scroll timer The timeout which defines each scroll step (mSec)

- Scroll dots or
- Scroll characters

The number of pixels scrolled for each timer timeout or
The number of character scrolled for each timer timeout
- Scroll behavior

OnlyOnce
Text scrolling stops after the first complete.

LoopWithDelay
Text scrolling restart after each complete cycle, waiting for the delay.

Loop
Text scrolling never stop

General General properties
- IdWidget identifier. You can leave the default value or rename it to have a more appropriate name
- VisibleWhen false the widget is not visible
- OpacityThe opacity-level describes the transparency-level, where 1 is not transparent at all, 0.5 is 50% see-through, and 0 is completely transparent.
- BlinkThe text will blink
- LockWhen True, the widget cannot be selected and moved from the JMobile Studio page editor
- Static Optimization

Normal

JMobile Studio will decide the best optimization mode to use

Static
JMobile Studio optimize the widget assuming it will never be modified by the runtime

Dynamic
JMobile Studio will not add additional optimizations

Position The widget position on the display. See "Widget position on the display"

Some properties have a couple of buttons:

Enter edit mode:
you can directly type the tag name to use

Attach to tag:
the dialog where select the tag to use will be opened

A double clicks over the label widget will open the edit dialog box where you can enter the text to display and set the main text properties.

Live Tags

"Enable Live Tags" is enabled, text between square brackets are managed as tags place holders and will be rendered, from the runtime, using the tag value.

For example, the text label "Temperature: [Tag1] ºC" will be rendered as:

Temperature: 18 ºC

where "18" is the value contained inside Tag1

Tags

Use '\' before '[ ]' if you want to show the '[ ]' in the description string, for example: \[Tag\[1\]\] will display the string "[Tag[1]]".

Use '\', even when the tag label contains square brackets. For example, to display the live tag value of tag “TAG]3” or “TAG[3]” use:

Array Tags

To reference the entire array (all elements will be shown):

To reference an element of the array:

Data Formats

Placeholder characters can be used to control how to display the tag value (see "Custom Formats")

Example:

Live: [fCounter|format("#.00")] - Triggered: [!fCounter|format("#.00")]

Note that by default, all tags are displayed as an integer. If you want to display a float number, you have to specify how to show the number adding the decimal digits.

Widget position on the display

Rotation

To rotate a widget, click two times the widget. After the first click, the markers will become square, after the second click will become circles. Now click the mouse over a circle marker and drag and drop to rotate the widget. The rotation center is identified by the CX and CY parameters.

Note that all "Position" properties can be attached to tags and can be modified dynamically at runtime to move the widget.